<ion-header>

  <ion-navbar>
    <ion-title>绑定子账户</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <form [formGroup]="validateForm" (submit)="beforeBindAccount($event)">
    <ion-list margin-top>
      <ion-item>
        <ion-label fixed for="account">子账户：</ion-label>
        <ion-input type="text" id="account" formControlName="account" placeholder="请输入要关联的账号" (ionChange)="getUser()"></ion-input>
        <ion-note item-end *ngIf="realName" class="color-green">{{realName}}</ion-note>
      </ion-item>
      <div class="error-message"
           *ngIf="getFormControl('account').dirty&&getFormControl('account').hasError('required')">请输入要关联的账号
      </div>
    </ion-list>
    <button ion-button color="primary" block type="submit">确定</button>
  </form>
</ion-content>
